<?php

namespace seecms\develop\config;

use seecms\See;

class DevelopConfig
{
    public $config = [];

    public function __construct($config)
    {
        $this->config = $config;
    }

    public static function get(): array
    {
        return See::config()->get('develop') ?? [];
    }

    /**
     * 开启开发工具菜单
     * @return bool
     */
    public static function switch(): bool
    {
        return self::get()['switch'] ?? false;
    }

    public static function viewLog()
    {
        return self::get()['view_log'] ?? [];
    }

    public static function viewLogRoot(): string
    {
        return self::get()()['root'] ?: '';
    }

    /**
     * 日志目录,日志查看器使用
     * @return string
     */
    public static function viewLogPath(): string
    {
        return self::get()['log_path'] ?: '';
    }
}